cmake_minimum_required(VERSION 3.20)
project(code C)

set(CMAKE_C_STANDARD 11)

include_directories(.)
include_directories(device)
include_directories(kernel)
include_directories(lib)
include_directories(lib/kernel)
include_directories(thread)
include_directories(userprog)
include_directories(include)
include_directories(include/linux)
include_directories(include/asm-i386)
include_directories(init)
include_directories(arch/i386/kernel)

add_executable(code
        device/console.c
        include/asm-i386/console.h
        device/ioqueue.c
        include/linux/ioqueue.h
        device/timer.c
        include/asm-i386/timer.h
        kernel/debug.c
        include/linux/debug.h
        kernel/interrupt.c
        include/asm-i386/interrupt.h
        kernel/syscall.c
        include/linux/syscall.h
        include/linux/list.h
        include/asm-i386/print.h
        lib/stdio.c
        include/asm-i386/stdio.h
        arch/i386/lib/string.c
        thread/sync.c
        include/linux/sync.h
        thread/thread.c
        include/linux/thread.h
        userprog/process.c
        include/linux/process.h
        userprog/syscall_user.c
        include/linux/syscall_user.h
        userprog/tss.c
        boot/grub_head.S
        include/linux/multiboot.h boot/boot.c include/linux/init.h
        init/main.c arch/i386/kernel/setup.c include/asm-i386/page.h mm/bootmem.c
        include/linux/mmzone.h mm/numa.c
        include/linux/fs.h include/asm-i386/atomic.h include/linux/kdev_t.h include/asm-i386/io.h include/linux/string.h include/linux/bootmem.h include/asm-i386/bitops.h include/asm-i386/e820.h mm/init.c include/asm-i386/pgtable.h include/asm-i386/pgtable-2level.h include/asm-i386/i2c.h include/asm-i386/processor.h include/asm-i386/dma.h mm/page_alloc.c mm/memory.c include/linux/mm.h include/linux/cache.h include/asm-i386/cache.h include/asm-i386/types.h include/asm-i386/system.h include/asm-i386/segment.h include/asm-i386/gdt.h arch/i386/kernel/traps.c include/asm-i386/desc.h include/linux/linkage.h include/asm-i386/hw-irq.h include/linux/sched.h arch/i386/kernel/i8259.c include/asm-i386/irq.h include/linux/spin_lock.h mm/swap.c include/linux/swap.h mm/slab.c include/linux/slab.h include/asm-i386/posix_types.h arch/i386/kernel/irq.c include/asm-i386/ptrace.h lib/kernel/lib.c)
